<?php
/* @var $this CobranzasController */
/* @var $model Movimientocyb */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'movimientocyb-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<input type="hidden" name="Movimientocyb[medio]" value="1" >
	</div>

	<div class="row">
		<div class="span-4">
			<?php echo $form->labelEx($model,'fecha'); ?>
			<?php //echo $form->textField($model,'fecha_pedido');
						$this->widget('zii.widgets.jui.CJuiDatePicker',
							array(
									'model'=>$model,
									'attribute'=>'fecha',
									'language'=>'es',
									'options'=>array(
											'dateFormat'=>'yy-mm-dd',
											'constrainInput'=>'false',
											'durarion'=>'fast',
											'showAnim'=>'slide',
											)
										)
							); ?>
			<?php echo $form->error($model,'fecha'); ?>
		</div>
		<div class="span-6">
			<?php echo $form->labelEx($model,'aQuien'); ?>
			<?php echo $form->dropDownList($model, 'aQuien',CHtml::listData(
					Venta::model()->findAll(array('order'=>'nombre','select'=>'cliente','with'=>'cliente0','condition'=>'saldado=0')),'cliente0.idCliente','cliente0.nombre'), 
					array('empty' => '-- Seleccione --'));?>
			<?php echo $form->error($model,'aQuien'); ?>
		</div>
		<div class="span-6">
			<?php echo $form->labelEx($model,'tComprobante'); ?>
			<?php  echo $form->dropDownList($model, 'tComprobante',CHtml::listData(Comprobante::model()->findAll(array('order'=>'descripcion','condition'=>'idComprobante in (1,4,9,11,3)')),'idComprobante','descripcion'),array('prompt' => 'Comprabante...'));?>
			<?php echo $form->error($model,'tComprobante'); ?>
		</div>
	</div>

	<div class="span-16">
		<div class="span-4">
			<?php echo $form->labelEx($model,'pComprobante'); ?>
			<?php echo $form->textField($model,'pComprobante'); ?>
			<?php echo $form->error($model,'pComprobante'); ?>
		</div>
		<div class="span-6">
			<?php echo $form->labelEx($model,'nComprobante'); ?>
			<?php echo $form->textField($model,'nComprobante'); ?>
			<?php echo $form->error($model,'nComprobante'); ?>
		</div>
		<div class="span-5">
			<?php echo $form->labelEx($model,'importe'); ?>
			<?php echo $form->textField($model,'importe',array('size'=>10,'maxlength'=>10)); ?>
			<?php echo $form->error($model,'importe'); ?>
		</div>
	</div>

	<div class="row">
		<div class="span-16">
			<?php echo $form->labelEx($model,'observacion'); ?>
			<?php echo $form->textArea($model,'observacion',array('rows'=>6, 'cols'=>50)); ?>
			<?php echo $form->error($model,'observacion'); ?>
		</div>
	</div>

	<div class="span-2">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Continuar' : 'Guardar y Continuar'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->